const sequelize = require('./model/db')
const { addUser } = require('./services/userServices')
require('./services/websocket-server')
require('./routes/init')
require('./model/create_tables')

/* // 测试连接
async function connect() {
  try {
    await sequelize.authenticate()
    console.log('连接成功')
  } catch (error) {
    console.error('连接失败，原因是:', error)
  }
}
connect() */

// 一次同步所有模型
sequelize.sync({
  alter: true,
})
/* .then(async () => {
    console.log('所有模型均已成功同步.')
  }) */
